package com.authority.tree;

import java.util.Comparator;

import org.apache.commons.lang.math.NumberUtils;


/** 
 * 节点比较器 
 */  
public class NodeIDComparator implements Comparator<Node> {  

	// 按照节点编号比较 
	@Override
	public int compare(Node o1, Node o2) {
		
		return NumberUtils.toInt(o1.getId()) - NumberUtils.toInt(o2.getId());
	}  
}  